/*
 * @Author: zhuxiaoyi
 * @Date: 2023-05-11 15:18:46
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2023-08-07 23:09:53
 * @Description:
 */
import { defineStore } from "pinia";
export const useUserStore = defineStore({
    id: "userInfoEi",
    state: () => {
        return {
            userInfo: {
                id: "10001",
                username: "admin",
                password: "21232f297a57a5a743894a0e4a801fc3",
                nickname: "管理员",
                createDate: "2022-09-24 13:39:25",
                state: "0",
                deptId: "10000",
                deptName: "",
                sex:"男",
                age:18
            },
            id: "666666",
        };
    },
    // 开启数据缓存
    persist: {
        enabled: true,
        strategies: [
            {
                key: "userInfoEi", //设置存储的key  全部储存
                storage: localStorage,
                // paths: ["id"], //指定要长久化的字段  选择储存
            },
        ],
    },
});
